package com.zlb.knifeprovider.controller;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.zlb.knifecommon.entity.BabyWxUser;
import com.zlb.knifecommon.service.IBabyWxUserService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/test")
public class TestController {
    @Resource
    private IBabyWxUserService babyWxUserService;

    @ResponseBody
    @RequestMapping(value = "/testQuery", produces = "application/json;charset=UTF-8")
    public JSONObject testQuery() {
        String name = "萝卜青菜";
        List<BabyWxUser> babyWxUserList = babyWxUserService.list();
        System.out.println("name:" + babyWxUserList);
        JSONObject object = new JSONObject();
        object.put("list",babyWxUserList);
        return object;
    }
}
